//28433×2^(7830457)+1

function timesLimit(a,b,limit) {   
    var tmp = a*b;
    return tmp%limit;
}

function pe97() {
    var limit=10000000000, pow=7830457;
    var tmp = 0, tmp2=1;
    var len2 = pow%30;
    var len1 = (pow-len2)/30;
    var two30 = Math.pow(2, 30);
    for(var i=1; i<=len1; i++) {
        tmp2 = timesLimit(tmp2, two30, limit);
    }
    tmp2 = timesLimit(tmp2, Math.pow(2,len2), limit);
    tmp2 = timesLimit(tmp2, 28433, limit);
    tmp = (1 + tmp2) % limit;
    return tmp;
}


print(pe97());
